﻿<section id="dashboard-view" class="mainbar" data-ng-controller="dashboard as vm">
  <section class="matter">
    <div class="container">
      <div class="row">
        <div class="span12">
          <ul class="today-datas">
            <li class="blightblue">
              <div class="pull-left"><i class="icon-plane"></i></div>
              <div class="datas-text pull-right">
                <span class="bold">ASP.NET</span>
                Last edited March, 21st, 2013
              </div>
              <div class="clearfix"></div>
            </li>
            <li class="borange">
              <div class="pull-left"><i class="icon-envelope"></i></div>
              <div class="datas-text pull-right">
                <span class="bold">{{vm.messageCount}}</span> Messages
              </div>
              <div class="clearfix"></div>
            </li>

          </ul>
        </div>
      </div>
      <div class="pull-right span3">
        <div class="widget wgreen">
          <div data-cc-widget-header title="{{vm.news.title}}"
               allow-collapse="true"></div>
          <div class="widget-content text-center text-info">
            <small>{{vm.news.description}}</small>
          </div>
          <div class="widget-foot">
            <div class="clearfix"></div>
          </div>
        </div>
      </div>
      <div class="row">
        <div class="span6">
          <div class="widget wviolet">
            <div data-cc-widget-header title="{{vm.members.max}} members of {{vm.members.total}}"
                 allow-collapse="true"></div>
            <div class="widget-content text-center text-info">
              <table class="table table-condensed table-striped">
                <thead>
                  <tr>
                    <th>Name</th>
                    <th>Role</th>
                    <th>Texts</th>
                  </tr>
                </thead>
                <tbody>
                  <tr data-ng-repeat="m in vm.members.data">
                    <td>{{m.name}}</td>
                    <td>{{m.fullName}}</td>
                    <td>{{m.teamName}}</td>
                  </tr>
                </tbody>
              </table>
            </div>
            <div class="widget-foot">
              <a href='@Url.Action("Index", "Team", new { area = "AuthorPortal" })'>Team Manager in PRO view...</a>
              <div class="clearfix"></div>
            </div>
          </div>
        </div>
      </div>
      <div class="clearfix"></div>
      <div class="row">
        <div class="span6">
          <div class="widget wviolet">
            <div data-cc-widget-header title="{{vm.texts.max}} texts of {{vm.texts.total}}"
                 allow-collapse="true"></div>
            <div class="widget-content text-center text-info">
              <table class="table table-condensed table-striped">
                <thead>
                  <tr>
                    <th>Name</th>
                    <th>Started At</th>
                    <th>Chapters</th>
                    <th>Project</th>
                  </tr>
                </thead>
                <tbody>
                  <tr data-ng-repeat="t in vm.texts.data">
                    <td>{{t.name}}</td>
                    <td>{{t.startedAt}}</td>
                    <td>{{t.language}}</td>
                    <td>{{t.version}}</td>
                  </tr>
                </tbody>
              </table>
            </div>
            <div class="widget-foot">
              <a href='@Url.Action("Opus", "Project", new { area = "AuthorPortal" })'>See all in PRO view...</a>
              <div class="clearfix"></div>
            </div>
          </div>
        </div>
      </div>
      <div class="clearfix"></div>
      <div class="row">
        <div class="span6">
          <div class="widget wviolet">
            <div data-cc-widget-header title="{{vm.projects.max}} projects of {{vm.projects.total}}"
                 allow-collapse="true"></div>
            <div class="widget-content text-center text-info">
              <table class="table table-condensed table-striped">
                <thead>
                  <tr>
                    <th>Name</th>
                    <th>Started At</th>
                    <th>Texts</th>
                    <th>Team</th>
                  </tr>
                </thead>
                <tbody>
                  <tr data-ng-repeat="p in vm.projects.data">
                    <td><a href="#/project/{{p.id}}">{{p.name}}</a></td>
                    <td>{{p.startedAt}}</td>
                    <td>{{p.textsCount}}</td>
                    <td><a href="#/team/{{p.teamId}}">{{p.teamName}}</a></td>
                  </tr>
                </tbody>
              </table>
            </div>
            <div class="widget-foot">
              <a href="#/projects/">Projects</a> | <a href='@Url.Action("Index", "Project", new { area = "AuthorPortal" })'>See all in PRO view...</a>
              <div class="clearfix"></div>
            </div>
          </div>
        </div>
      </div>
    </div>

  </section>
</section>